<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Connecting</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mongo.sqltomongo.html">« SQL to Mongo Mapping Chart</a></li>
      <li style="float: right;"><a href="mongo.connecting.ssl.html">Connecting over SSL »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="mongo.manual.html">Manual</a></li>
    <li>Connecting</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mongo.connecting" class="chapter">
 <h1>Connecting</h1>
<h2>Table of Contents</h2><ul class="chunklist chunklist_chapter"><li><a href="mongo.connecting.ssl.html">Connecting over SSL</a></li><li><a href="mongo.connecting.auth.html">Authentication</a></li><li><a href="mongo.connecting.rs.html">Replica Sets</a></li><li><a href="mongo.connecting.mongos.html">Sharding</a></li><li><a href="mongo.connecting.uds.html">Domain Socket Support</a></li><li><a href="mongo.connecting.persistent.html">Persistent Connections (version 1.3.0+)</a></li><li><a href="mongo.connecting.pools.html">Connection Pooling (version 1.2.0-1.2.12 *only*)</a></li><li><a href="mongo.connecting.persistent.manual.html">Manually Persistent Connections (version up to 1.1.4 *only*)</a></li></ul>


 <p class="para">
  Connecting to MongoDB can be as easy as <code class="literal">new MongoClient</code>,
  but there are many additional options and configurations. The documentation
  for <span class="function"><a href="mongoclient.construct.html" class="function">MongoClient::__construct()</a></span> covers all of the API
  options, but this page gives some more details and advice for practical use
  cases.
 </p>

 

 

 

 

 

 

 

 

</div>
</div></div></body></html>